﻿using UnityEngine;
using System.Collections;
using System.Net;
using System;

public class JoinButton : Touchable {

	override public void TouchEnd(Touch t) {
		var server = GameObject.Find("ServerHandler").GetComponent<Server>();
		try {
			server.JoinHost(IPAddress.Parse("172.17.65.31"));
			Application.LoadLevel(1);
		} catch(Exception e) {
			Debug.Log (e);
		}
	}
}
